home *** CD-ROM | disk | FTP | other *** search
-
- COMMENTS ON SCRTEST - GENERAL PURPOSE DEMO OF BROWSER/SCROLLER 26/July/93
- ============================================================== ==========
-
- Hi All,
-
- First the excuses :
- -------------------
- I'm new to V.B. so this is probably NOT the best way to do it, I really
- would like suggestions on any improvements. I've just ported the code
- from the way I do it in Clipper, I've had to use cheats to implement
- the extra bits required to support Scroll-Thumb directed movements.
-
- Listbox / Scroll-bar synchronization
- ------------------------------------
- Keeping the Listbox and the Scroll-bar in synch drove me *NUTS* because
- altering the Listbox-index from the scroll-change event triggered a
- Listbox-click event and altering the Scroll-value from the Listbox-click
- event triggered a scroll-change event. This resulted in some pretty amazing
- recursion loops. I got round the problem by keeping a 'recursion-depth'
- counter and ingnoring events below the surface level. There must be a better
- way !
-
- Key Searches
- ------------
- The keypress seeks are really nice when you're in a big file and want to get
- to a specific entry fast. You might want to add some extra feedback in a label
- or text box so the User can see how the Composite key is building up and know
- when the search fails. I keep a truncated data key in the file that has the
- characters converted to upper-case.
-
- Thumb directed reads
- --------------------
- I've implemented this because people seem to expect it in windows apps, I'm
- not at all convinced that it serves any real purpose because the fastest way
- to get what you want has to be a keyed search. What I do is have a record-number
- stored in the file that reflects its relative position in the file. This can
- only be maintained as a 'batch' process so it's not so good for constantly
- changing files.
-
- Obvious improvements
- --------------------
- It's not too efficient only loading 10 records at a time, some sort of buffer
- coding could enable more to be loaded at a time but the code would be more
- complicated.
-
- Questions
- ---------
- Can I index a field on its contents converted to upper case ?
-
- Can I jump directly to a relative position in an indexed file - eg. the 1,275th
- record (measured from the start and INDEXED) of a 5,000 record file ?
-
- Can I jump directly to the first or last record of an indexed file without
- cheating with a SEEK ( the equivalent of a GO TOP or GO BOTTOM in dBase) ?
-
- Are there any limitations on the range of ascii characters allowed to be in
- a database field ?
-
-
- The application
- ---------------
- I have an application written in Clipper that has the UK pop charts for every
- week since 1960. Access is by Group, Title and Date. I'm currently trying to
- port it across to V.B. because :
- 1) It's a good way to learn V.B.
- 2) There is a market for the product ported to windows
- 3) I prefer working from windows these days (it's so much NICER)
-
-
- Regards,
-
- Ross Whittaker
- CIS:100275,317
- ~~~~~~~~~~~~~~
-
- p.s.
- Can I have lots of feedback PLEASE, all criticism gratefully received
-
-
- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-
- SCRTEST.ZIP - File contents
- ---------------------------
- README - This file
- SCRTEST.MAK - The project file
- SCRTEST.FRM - The form file
- AFILE.MDB - The data file (a subset of 60's pop groups if you must know)
- AFILE.LDB - The data control file (?)
-
- The test file data structure
- ----------------------------
- Database = AFILE
- Table = ATABLE
- Fields = AFIELD X(30) (main data field)
- ARECNO X(5) (relative position)
- AKEY X(10) (upper(mid(afield,1,10)))
- Indexes = AINDEX1 = ARECNO UNIQUE PRIMARY
- AINDEX2 = AKEY DUPS-OK NOT-PRIMARY
-
- ==================== end of file =========================